<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<style>
.cot4 {
	width: 194px;
}
.cot1{
	width: 224px;
}
.cot2{
	width: 254px;
}
.cot3{
	width: 94px;
}
</style>
<h1>Organization List</h1>
<div style="margin: 20px 0px">
	<a href="Govs">All</a> | <a href="">0 - 9</a> | <a href="?split=ABCDE">A
		B C D E</a> | <a href="?split=FGHIJ">F G H I J</a> | <a href="?split=KLMN">K
		L M N</a> | <a href="?split=OPQR">O P Q R</a> | <a href="?split=STUV">S
		T U V</a> | <a href="?split=WXYZ">W X Y Z</a>
	<div style="float: right">
		<form>
			<c:choose>
				<c:when test="${check == 0}">
					<input type="checkbox" value=""
						onclick="window.location='?check=1'; return true;"> Include
			In-Active
    </c:when>
				<c:otherwise>
					<input type="checkbox" value="" checked="checked"
						onclick="window.location='?check=0'; return true;"> Include
			In-Active
			</c:otherwise>
			</c:choose>
		</form>
	</div>
	<div style="float:right; margin-right: 20px"><a href="addorganization"><input class="phai" type="button" value="Create" /></a></div>
</div>

<div style="display: block; float: left; clear: both">
	<ul>
		<li class="li_title">
			<div class="cot1">Name</div>
			<div class="cot2">Address</div>
			<div class="cot3">PostCode</div>
			<div class="cot4">Town</div>
		</li>
		<c:forEach items="${organizationList}" var="organization">
				<li>
					<div class="cot1"><a href="#?/${organization.id}">${organization.name}</a></div>
					<div class="cot2">${organization.address.getAddress1()}</div>
					<div class="cot3">${organization.address.getPostcode()}</div>
					<div class="cot4">${organization.address.getTown().getTownName()}</div>
			</li>
		</c:forEach>
	</ul>
</div>
<div
	style="width: 100%; float: left; cleat: both; display: block; margin-top: 15px;">
<%-- 	<form action=''>
		<div class="phantrang">
			<c:if test="${page > 1}">
				<a class="page" href="?split=${split}&page=${page-1}&check=${check}">Pre</a>
			</c:if>
			Page <input name="page" type="textbox" value="${page}"
				style="width: 30px"><input type="submit"
				style="display: none"> Of
			<c:if test="${size > 0}"> ${size} </c:if>
			<c:if test="${size > page}">
				<a class="page" href="?split=${split}&page=${page+1}&check=${check}">Next</a>
			</c:if>
		</div>
	</form> --%>
</div>